package ParseConfigFileStrategy

import (
	"dbManager/manager/config"
	"dbManager/manager/utils"
	"log"
)

var path = "E:/workspace/db-mange/manager/config/defaultConfig.toml"

type DefaultReadConfigFileStrategy struct {
}

func (defaultReadConfigFileStrategy DefaultReadConfigFileStrategy) Parse() config.Config {
	config := config.SqliteConfig{}
	err := utils.TomlDecode(path, &config)
	if err != nil {
		log.Println(err)
		return nil
	}
	return &config
}
